export function debounce(callback,delay){
    var timer = null;
    return function(){
      if(timer) clearTimeout(timer);
      timer=setTimeout(()=>{
        callback.call(this);
      },delay)
    }   
}